home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / toasc.lst < prev    next >
File List  |  1991-01-29  |  5KB  |  92 lines

  1.                                     \->ASC
  2.  
  3. 80000: 02D9D ! Program
  4. 80005: 1592D ; Set last RPL token to <0h> and verify DEPTH >= 1
  5. 8000A: 03188 ; Internal DUP
  6. 8000F: 05944 ; Internal BYTES (non-ROM objects) -> (2:System Binary,1:Binary Integer)
  7. 80014: 03223 ; Internal SWAP
  8. 80019: 055DF ; ""
  9. 8001E: 032C2 ; Internal OVER
  10. 80023: 6257A ; Internal add 4 (1:System Binary)
  11. 80028: 03188 ; Internal DUP
  12. 8002D: 64BDA ; <40h>
  13. 80032: 03EF7 ; Internal / (2:System Binary,1:System Binary) -> (2:rem,1:div)
  14. 80037: 03223 ; Internal SWAP
  15. 8003C: 03CA6 ; if TOS = 0 (System Binary) -> True/False
  16. 80041: 619BC ; if pop TOS != True, then skip next token
  17. 80046: 03E0E ; Internal subtract one (1:System Binary)
  18. 8004B: 03DBC ; Internal + (2:System Binary,1:System Binary)
  19. 80050: 03E6F ; Internal multiply by 2 (1:System Binary)
  20. 80055: 61C1C ; allocate nibbles (2:sized object,1:System Binary)
  21. 8005A: 03223 ; Internal SWAP
  22.     ; *** (4:orig object,3:checksum,2:alloc str,1:size) ***
  23. 8005F: 02DCC ! Code
  24. 80064: 000CD ! 205 nibbles (next RPL at 80131)
  25. 80069: 8F14660    GOSBVL 06641          ; MC: pop TOS (System Binary) -> A.A
  26. 80070: CC         A=A-1  A              ; A.A = size-1
  27. 80072: 8FB9760    GOSBVL 0679B          ; MC: save D0,D1,B,D (uses C,D0), clear carry
  28. 80079: 840        ST=0   0              ; start object phase
  29. 8007C: 3104       LCHEX  40             ! "@"
  30. 80080: AE7        D=C    B              ; D (characters per line) = 64
  31. 80083: D8         B=A    A              ; B.A = size-1
  32. 80085: 143        A=DAT1 A              ; A.A = adr of alloc str
  33. 80088: 130        D0=A                  ; D0 = adr of alloc str
  34. 8008B: 169        D0=D0+ 10             ; D0 = adr of alloc str data
  35. 8008E: 174        D1=D1+ 5              ; point to checksum on stack
  36. 80091: 147        C=DAT1 A              ; C.A = adr of checksum
  37. 80094: 06         RSTK=C                ; save adr of checksum
  38. 80096: 174        D1=D1+ 5              ; point to orig object
  39. 80099: 143        A=DAT1 A              ; A.A = adr of orig object
  40. 8009C: 131        D1=A                  ; D1 = adr of orig object
  41.     ; *** Verify RAM object ***
  42. 8009F: 1534       A=DAT1 S              ; A.S = first nibble of object
  43. 800A3: AC6        C=A    S              ; C.S = first nibble of object
  44. 800A6: B44        A=A+1  S              ; modify A.A's copy of data
  45. 800A9: 1514       DAT1=A S              ; and try to update memory
  46. 800AD: 1534       A=DAT1 S              ; fetch nibble back
  47. 800B1: 94690      ?A#C   S              ; go if RAM (changed)
  48.           GOYES  800BD
  49. 800B6: 8D9B026    GOVLNG 620B9          ; MC: restore regs and push True
  50. 800BD: 1554       DAT1=C S              ; fix RAM (replace orig nibble)
  51. 800C1: A6F        D=D-1  B              ; count character in line
  52. 800C4: 531        GONC   800D8          ; go if not EOL
  53. 800C7: 31F3       LCHEX  3F             ! "?"  ; reset D for new line (D=63)
  54. 800CB: AE7        D=C    B              ; ...
  55. 800CE: 31A0       LCHEX  0A             ! "."
  56. 800D2: 14C        DAT0=C B              ; append line feed
  57. 800D5: 161        D0=D0+ 2              ; ...
  58. 800D8: AE2        C=0    B              ; convert nibble to character
  59. 800DB: 15F0       C=DAT1 1            
  60. 800DF: 8082103    LAHEX  30             ! "0"
  61. 800E6: A62        C=C+A  B            
  62. 800E9: 8082193    LAHEX  39             ! "9"
  63. 800F0: 9EEC0      ?A>=C  B            
  64.           GOYES  800FF
  65. 800F5: 8082170    LAHEX  07             ! "."
  66. 800FC: A62        C=C+A  B            
  67. 800FF: 14C        DAT0=C B              ; store character into string
  68. 80102: 161        D0=D0+ 2              ; next character
  69. 80105: 170        D1=D1+ 1              ; next nibble
  70. 80108: CD         B=B-1  A              ; decr nibbles remaining
  71. 8010A: 56B        GONC   800C1          ; go if more
  72. 8010D: 870A1      ?ST=1  0              ; exit if checksum in progress
  73.           GOYES  8012A
  74. 80112: 850        ST=1   0              ; start checksum phase
  75. 80115: 3430000    LCHEX  00003          ; B.A = 3 (size of checksum - 1)
  76. 8011C: D5         B=C    A              ; ...
  77. 8011E: 07         C=RSTK                ; C = adr of checksum
  78. 80120: 135        D1=C                  ; D1 = adr of checksum
  79. 80123: 179        D1=D1+ 10             ; D1 = adr of checksum data
  80. 80126: 6A9F       GOTO   800C1          ; go process checksum
  81. 8012A: 8D2D026    GOVLNG 620D2          ; MC: restore regs and push False
  82.  . . . . . . ! End of Code
  83.     ; *** (4:orig object,3:checksum,2:new string,1:True/False) ***
  84. 80131: 61993 ; if pop TOS = True, then do next/return, else skip next
  85. 80136: 02D9D ! Program
  86. 8013B: 03258 ; Internal DROP2
  87. 80140: [...] ! "ROM Object"
  88. 8015E: 1A339 ; DOERR (XLIB 2 42)
  89. 80163: 0312B ! End Marker
  90. 80168: 6112A ; drop level two and three objects
  91. 8016D: 0312B ! End Marker
  92.